tests: not all UNIX-like OSes have a libpthread.
authorJehan <jehan@girinstud.io>
Mon, 4 Dec 2017 02:33:47 +0000 (03:33 +0100)
committerJehan <jehan@girinstud.io>
Mon, 4 Dec 2017 02:33:47 +0000 (03:33 +0100)
In particular Android systems don't need to link with -lpthread
(actually the link would fail with "ld: cannot find -lpthread").
Use the $(THREAD_LIB) variable which is set correctly during configure
since commit c02af82.

tests/Makefile.am

index 59bb296a405982c8ebf9951a0b1c1864c48fd6e5..98f4ae28dae78c1333a4af8197e896022fbf685f 100644 (file)
@@ -34,13 +34,7 @@ TESTS = \
 TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(top_builddir)/babl:$LD_LIBRARY_PATH GI_TYPELIB_PATH=$(top_builddir)/babl BABL_PATH=$(top_builddir)/extensions/.libs
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl
-if OS_UNIX
-AM_LDFLAGS  = -lpthread -no-install
-else
-
-AM_LDFLAGS  = -no-install
-endif
-
+AM_LDFLAGS  = $(THREAD_LIB) -no-install
 
 LDADD = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
        $(MATH_LIB) $(THREAD_LIB)